package com.tjhk.design;

import java.lang.reflect.Constructor;

public class SpringTest {
    public static void main(String[] args) throws Exception {
        Singleton singleton = Singleton.getInstance();
        Constructor<Singleton> constructor =  Singleton.class.getDeclaredConstructor();
        constructor.setAccessible(true);
        Singleton singleton2 = constructor.newInstance();
        System.out.println(singleton); //com.tjhk.design.Singleton@7f31245a
        System.out.println(singleton2); //com.tjhk.design.Singleton@6d6f6e28
    }

    static int[] bubble(int[] m){
        for (int i=0;i<m.length - 1;i++){
            for (int j = 0; j < m.length - 1 - i; j++) {
                if (m[j] > m[j+1]){
                    int temp = m[j];
                    m[j] = m[j+1];
                    m[j+1] = temp;
                }
            }
        }
        return m;
    };

}
